<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>mptopt</title>
<style type="text/css">
	body {background-color: white; color: black; font-family:sans-serif; font-size:medium;}
	a:link {color: #3300ff;}
	a:visited {color: #663399;}
	a:hover {color:#0099ff;}
	a:active {color: #0066cc;}
	a.button {text-decoration:none;}
	
	table.nav  {background-color: #dbddff;}
	table.body {margin-top:2ex; margin-bottom:2ex;}
	table.programlistingindent {margin-left:32px;}
	
	img { margin-bottom:0px; margin-top:0px;}
	tt {margin-left:0.5em; margin-right:0.5em; font-weight:lighter;}
	
	p {margin-top:0ex;}
	p.synopsis {margin-left:32px;}
	p.programlistingindent {margin-left:32px;}
	p.citetitle {margin-left:2em;}
	
	ul ul {list-style-type:square;}
	ul li p {margin-top:0ex; margin-bottom:.5ex; padding:0}
	ol li p {margin-top:0ex; margin-bottom:.5ex; padding:0}
	
	h1.reftitle {color:#a90000;}
	h1.reftitle {font-size:3.7ex; margin-top:0; margin-bottom:0; font-weight:bold}
	h1.title {color:black; font-size:4ex; margin-top:1ex; font-weight:bold}
	h2.title {color:#bd0000; margin-top:1ex; margin-bottom:.9ex; font-weight:bold; font-size:3ex}
	h3.title {color:#bd0000; margin-top:1ex; margin-bottom:.9ex; font-weight:bold; font-size:2.5ex}
	h4.title {color:#bd0000; margin-top:1ex; margin-bottom:.9ex; font-weight:bold; font-size:2ex}
	h2 {color:#bd0000; margin-top:1ex; margin-bottom:.9ex; font-weight:bold; font-size:2.5ex}
	h3 {color:#bd0000; margin-top:1ex; margin-bottom:.9ex; font-weight:bold; font-size:2ex} 
	
	pre.programlisting {margin-left:32px;}
	pre.synopsis {margin-left:32px;}
	
	
	.categorytitle {margin-top:8px; padding-top:0px;}
	.categorylist {background-color: #e1e6f2;}
 	</style>
</head>
<body>
<a name="top_of_page"></a><p style="font-size:1px;"></p>
<h1 class="reftitle">mptopt</h1>
<h2>Purpose</h2>
<p>Global option handler for MPT.</p>
<h2>Syntax</h2>
<pre class="synopsis">mptopt('Parameter1',Value1,'Parameter2',Value2,...)</pre>
<h2>Description</h2>
<p></p>
        The function/class <tt>mptopt</tt> plays the role of global option handler throughout MPT.
        Any specific option should be changed using <tt>mptopt</tt> function. The syntax follows
        the "parameter-value" scheme where the <tt>parameter</tt> is the desired option and <tt>value</tt>
        is the assignment to this option. The changes take effect immediatelly and are valid globally
        through the whole MPT toolbox. Global options are kept in memory after initialization and 
        any changes in the option are preserved between sessions.
        
	<h2>Input Arguments</h2>
<table cellspacing="0" class="body" cellpadding="4" border="0" width="100%">
<colgroup>
<col width="31%">
<col width="69%">
</colgroup>
<tbody>
<tr valign="top">
<td><tt>Parameter1</tt></td>
<td>
<p></p>The name of the desired option to be changed provided as string. The list of available options can be 
        obtained by typing <tt>properties('mptopt')</tt> at the Matlab prompt.<p>
	    		Class: <tt>char</tt></p>
</td>
</tr>
<tr valign="top">
<td><tt>Value1</tt></td>
<td>
<p></p>The value to be assigned to <tt>Parameter1</tt>. <p>
	    		Class: <tt>double or char</tt></p>
</td>
</tr>
</tbody>
</table>
<h2>Example(s)</h2>
<h3>Example 
				1</h3>This example shows how to change LP solver to "CDD". To list which solvers are installed, invoke <tt>solvers_list</tt> option from <tt>mptopt</tt> class.This is achieved by assigning the output from <tt>mptopt</tt> class to some variable and referring to <tt>solvers_list</tt> field as follows:<pre class="programlisting"> s = mptopt </pre>
<pre class="programlisting">
s = 

 Global settings for MPT:
                  version: @version@ 
             solvers_list: [struct] 
                  rel_tol: 1e-06 
                  abs_tol: 1e-08 
                  lex_tol: 1e-10 
                 zero_tol: 1e-12 
               region_tol: 1e-07 
            report_period: 2 
                  verbose: 0 
                 infbound: 10000 
                 colormap: matrix of size [10 x 3] 
                 lpsolver: LCP 
                 qpsolver: LCP 
               milpsolver: GLPK 
               miqpsolver:  
                lcpsolver: LCP 
                plpsolver: PLCP 
                pqpsolver: PLCP 
               plcpsolver: PLCP 
                  modules: [struct] 
</pre>
<pre class="programlisting"> s.solvers_list.LP </pre>
<pre class="programlisting">
ans = 

    'LCP'
    'CDD'
    'GLPK'
    'LINPROG'
    'QPOASES'
    'CLP'
    'SEDUMI'

</pre> If CDD solver is present in the list, it means that it exist on the Matlab path. To change CDD solver as default for solving LP, it can be 
        done twofold.  Assignment with the help of the output variable <tt>s</tt>:<pre class="programlisting"> s.lpsolver = 'CDD'; </pre>
<pre class="programlisting"></pre> or calling <tt>mptopt</tt> via standard syntax <pre class="programlisting"> mptopt('lpsolver','CDD'); </pre>
<pre class="programlisting"></pre>
<h3>Example 
				2</h3>Options for any module are stored here as well. For instance, the geometry module of MPT that contains operations
        on polyhedra has the options stored under <pre class="programlisting"> s = mptopt; </pre>
<pre class="programlisting"></pre>
<pre class="programlisting"> s.modules.geometry </pre>
<pre class="programlisting">
ans = 

      sets: [1x1 struct]
    unions: [1x1 struct]

</pre> These options can be changed from any instance of the script and take effect globally. To reset to default options
        use the function <pre class="programlisting"> mpt_init </pre>
<pre class="programlisting">MPT searches for solvers on the path ...
 
 LINPROG ............................................ linprog.m 
 QUADPROG .......................................... quadprog.m 
 GLPK .................................................. glpkcc 
 CDD ................................................... cddmex 
 CLP ................................................... mexclp 
 QPOASES .............................................. qpOASES 
 LCP ...................................................... lcp 
 SEDUMI .............................................. sedumi.m 
 QPSPLINE .......................................... QPspline.m 
 PLCP .............................................. mpt_plcp.m 
 MPQP .............................................. mpt_mpqp.m 
 MPLP .............................................. mpt_mplp.m 

MPT toolbox @version@ initialized...
Copyright (C) 2003-2013 by M. Kvasnica, C.N. Jones, and M. Herceg
For news, visit the MPT web page at http://control.ee.ethz.ch/~mpt/
            LP solver: LCP
            QP solver: LCP
          MILP solver: GLPK
 parametric LP solver: PLCP
 parametric QP solver: PLCP
 
These default options can be changed. See "help mptopt" for more details.
</pre>
<h2>See Also</h2>
<a href="./mpt_init.html">mpt_init</a><p></p>
<table class="nav" summary="Navigation aid" border="0" width="100%" cellpadding="0" cellspacing="0"><tr valign="top">
<td align="left" width="20">
<a href="../mpt.html" class="button">&#9664;</a>  </td>
<td align="left">mpt</td>
<td>  </td>
<td align="right">mpt_init</td>
<td align="right" width="20"><a href="mpt_init.html" class="button">&#9654;</a></td>
</tr></table>
<br><p>©  <b>2010-2013</b>     Martin Herceg: ETH Zurich,    <a href="mailto:herceg@control.ee.ethz.ch">herceg@control.ee.ethz.ch</a></p>
</body>
</html>
